package spec.zhangyuehua.$03.$0301;

/**
 * Created by yue on 2017/9/19.
 */
public class FinanceInfo {
    private String companyName;
    private double earnestIncome;
    private double depositIncome;
    private double rentIncome;
    private double otherIncome;
    private double staffCost;
    private double rentCost;
    private double hydropwerCost;
    private double taxCost;
    private double otherCost;
    public String getCompanyName(){
        return companyName;
    }
    public void setCompanyName(String companyName){
        this.companyName=companyName;
    }
    public double getEarnestIncome(){
        return earnestIncome;
    }
    public void setEarnestIncome(double earnestIncome){
        this.earnestIncome=earnestIncome;
    }
    public double getDepositIncome(){
        return depositIncome;
    }
    public void setDepositIncome(double depositIncome){
        this.depositIncome=depositIncome;
    }
    public double getRentIncome(){
        return rentIncome;
    }
    public void setRentIncome(double rentIncome){
        this.rentIncome=rentIncome;
    }
    public double getOtherIncome(){
        return otherIncome;
    }
    public void setOtherIncome(double otherIncome){
        this.otherIncome=otherIncome;
    }
    public double getStaffCost(){
        return staffCost;
    }
    public void setStaffCost(double staffCost){
        this.staffCost=staffCost;
    }

    public double getRentCost() {
        return rentCost;
    }

    public void setRentCost(double rentCost) {
        this.rentCost = rentCost;
    }

    public double getHydropwerCost() {
        return hydropwerCost;
    }

    public void setHydropwerCost(double hydropwerCost) {
        this.hydropwerCost = hydropwerCost;
    }

    public double getTaxCost() {
        return taxCost;
    }

    public void setTaxCost(double taxCost) {
        this.taxCost = taxCost;
    }

    public double getOtherCost() {
        return otherCost;
    }

    public void setOtherCost(double otherCost) {
        this.otherCost = otherCost;
    }
    public double calIncome(){
        double sum=earnestIncome+depositIncome+rentIncome+otherIncome;
        return sum;
    }
    public double calCost(){
        double sum=staffCost+rentCost+hydropwerCost+taxCost+otherCost;
        return sum;
    }
    public double calNetIncome(){
        System.out.println(companyName+"的净收入计算结果：");
        double netIncome=calIncome()-calCost();
        return  netIncome;
    }
}
